package com.tenghu.swa.user.controller;

import com.tenghu.swa.user.entity.Users;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Arvin on 2017/12/7.
 */

@RestController
@RequestMapping(value = "/user")
@Api(value = "用户服务接口",description = "提供对客户操作服务接口（增、删、改、查）用户信息")
public class UserController {
    private static List<Users> usersList=new ArrayList<Users>();

    static {
        usersList.add(new Users("1","zhangsan","张三","zhangsan"));
        usersList.add(new Users("2","lisi","李四","lisi"));
    }

    @RequestMapping(value = "/all",method = RequestMethod.GET)
    @ApiOperation(value = "获取所有用户信息",notes = "获取所有有效用户信息")
    public List<Users> getAllUser(){
        return usersList;
    }
}
